package datahandling;


public class Line {
	private String data;
	private int label_pos;
	private char label;
	private int lineNum;
	private int rowNum;
	
	public Line(String data,int label_pos,int num){
		this.lineNum = num;
		this.data = data;
		this.label_pos = label_pos;
		Analyzer.checkLineError(data,lineNum);
		String[] result = Analyzer.getLineLabel(data,label_pos);
		this.label = result[0].toCharArray()[0];
		this.rowNum = Integer.valueOf(result[1]);
		storeLabel();
	}
	public int getRowNum(){
		return this.rowNum;
	}

	public void storeLabel(){
		Label.store(this.label,this.data,this.label_pos);
	}
	
}
